﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using LikeUs.WebService.Contract;

namespace LikeUs.WebService.ServerImpl
{
    /// <summary>
    /// Implementaion of the WS server
    /// </summary>
    [ServiceBehavior (InstanceContextMode = InstanceContextMode.Single, 
        ConcurrencyMode = ConcurrencyMode.Multiple)]
    public class WSInfoImpl : IWSInfo
    {
        public MovieInfo GetMovieInfo(int userId)
        {
            MovieInfo movieInfo = new MovieInfo();
            movieInfo.Name = "Back To the Future I";
            movieInfo.PublishYear = new DateTime(1985, 0, 0);
            movieInfo.Summary = "Bla Bla Good Movie";
            movieInfo.Rate = 10;
            return movieInfo;
        }

        public UserInfo GetUserInfo(int userId)
        {
            UserInfo userInfo = new UserInfo();
            userInfo.Name = "Shmulik Shmulevi";
            userInfo.Email = "Shmulik@gmail.com";
            userInfo.Comment = "Bla Bla";
            return userInfo;
        }
    }
}
